<form name="form_second" id="form_second">
    <input type="hidden" name="from" value="{:input('from')}">
    <input type="hidden" name="id" value="{$addressRs.id}">
    <input type="hidden" name="userid" value="{:session('userid')}">
    <input type="hidden" name="area_title">
    <div class="w-100 mb-3">
        <div class="row">
            <div class="col-md-3 text-right pt-2"><span class="text-danger mr-1">*</span>{:lang('v_realname')}</div>
            <div class="col-md-8">
                <input name="consigner" id="consigner" type="text" value="{$addressRs.consigner}" maxlength="20" class="w-100 input" />
                <div id="consigner_tips" class="text-danger font-weight-bold"></div>
            </div>
        </div>
    </div>
    <div class="w-100 mb-3">
        <div class="row">
            <div class="col-md-3 text-right pt-2"><span class="text-danger mr-1">*</span>{:lang('v_area')}</div>
            <div class="col-md-9" id="area">
                {for start="1" end="5"}
                    <select name="areaid" class="area{$i} input">
                        {notempty name="addressRs.id"}<!--编辑状态-->
                            {switch name="i"}
                                {case value="1"}<option value="{$a}" selected>{/case}
                                {case value="2"}<option value="{$b}" selected>{/case}
                                {case value="3"}<option value="{$c}" selected>{/case}
                                {case value="4"}<option value="{$d}" selected>{/case}
                            {/switch}
                            </option>
                        {/notempty}
                    </select>
                {/for}
            </div>
        </div>
    </div>
    <div class="w-100 mb-3">
        <div class="row">
            <div class="col-md-3 text-right pt-2"><span class="text-danger mr-1">*</span>{:lang('v_address')}</div>
            <div class="col-md-8">
                <input name="address" id="address" value="{$addressRs.address}" type="text" maxlength="100" class="w-100 input" />
                <div id="address_tips" class="text-danger font-weight-bold"></div>
            </div>
        </div>
    </div>
    <div class="w-100 mb-3">
        <div class="row">
            <div class="col-md-3 text-right pt-2"><span class="text-danger mr-1">*</span>{:lang('v_mobile')}</div>
            <div class="col-md-8">
                <input name="mobile" id="mobile" value="{$addressRs.mobile}" type="text" maxlength="20" class="w-100 input" />
                <div id="mobile_tips" class="text-danger font-weight-bold"></div>
            </div>
        </div>
    </div>
    <div class="w-100 mb-3">
        <div class="row">
            <div class="col-md-3 text-right pt-2">{:lang('v_telephone')}</div>
            <div class="col-md-8">
                <input name="telephone" id="telephone" value="{$addressRs.telephone}" type="text" maxlength="30" class="w-100 input" />
            </div>
        </div>
    </div>
    <div class="w-100 mb-3">
        <div class="row">
            <div class="col-md-3 text-right pt-2">Email</div>
            <div class="col-md-8">
                <input name="email" id="email" value="{$addressRs.email}" type="text" maxlength="50" class="w-100 input" />
                <div id="email_tips" class="text-danger font-weight-bold"></div>
            </div>
        </div>
    </div>
    <div class="w-100 mb-3">
        <div class="row">
            <div class="col-md-3 text-right pt-2">{:lang('v_default')} {:lang('v_address')}</div>
            <div class="col-md-8">
                <label class="mr-4 pt-2"><input type="radio" name="signid" value="1" {eq name="addressRs.signid" value="1"}checked="checked"{/eq} class="mr-1">{:lang('v_yes')}</label>
                <label><input type="radio" name="signid" value="0" {if $addressRs.signid eq 0 or empty($addressRs.signid)}checked="checked"{/if} class="mr-1">{:lang('v_no')}</label>
            </div>
        </div>
    </div>
    <div class="w-100 text-center">
        <button type="button" class="do_ajax btn btn-success mr-4" onclick="javascript:do_ajax('#form_second','.do_ajax','{:url('/shop_address/edit',['lang'=>$lang,'id'=>$addressRs['id']])}','{:url('/shop_address/index',['lang'=>$lang,'signid'=>input('signid')])}');"><i class="fa fa-check-circle mr-2"></i>{:lang('v_save')}</button>
    </div>
</form>